package cn.school.thoughtworks.section1;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

public class PracticeA {
    List<String> c = null;
    List<String> collectSameElements(List<String> collection1, List<String> collection2) {
        c = new ArrayList(collection1);
        c.retainAll(collection2);
        return c;

    }
}
